import fetch from 'common/src/utils/fetch';
/**
 *
 * 查询研究生开班
 */
export function findMasterClassroom(data) {
    return fetch({
        url: '/api/arrangementservice/masterClassManage/findMasterTeachingClass2',
        method: 'post',
        data
    });
}

/**
 *
 * 查询研究生过滤后的开班
 */
export function findFilterMasterClassroom(data) {
    return fetch({
        url: '/api/arrangementservice/masterClassManage/findFilterMasterClass',
        method: 'post',
        data
    });
}

/**
 * 查询辅修微专业开班
 * @param {*} data
 */
export function findMinorClass(data) {
    return fetch({
        url: '/api/arrangementservice/masterClassManage/findMinorTeachingClass',
        method: 'post',
        data
    });
}

export const findClassRoomCourseUrl = '/api/arrangementservice/masterClassManage/findMasterCourse';

export const findMinorCourseUrl = '/api/arrangementservice/masterClassManage/findMinorCourse';
/** *
 * 查询开班课程信息
 */
export function findClassRoomCourse(data) {
    return fetch({
        url: '/api/arrangementservice/masterClassManage/findMasterCourse',
        method: 'post',
        data
    });
}

/** *
 * 批量开班
 * data 课程ID list
 * classNum 开班数量
 * calssNumber 班级人数
 */
export function addClassroom(data, classNum, calssNumber) {
    return fetch({
        url: '/api/arrangementservice/masterClassManage/addMasterClassroom?classNum=' + classNum + '&calssNumber=' + calssNumber,
        method: 'post',
        data
    });
}

/** *
 * 编辑教学班信息
 */
export function updateClassroom(data) {
    return fetch({
        url: '/api/arrangementservice/masterClassManage/updateClassroom',
        method: 'post',
        data
    });
}

/** *
 * 删除教学班
 */
export function deleteClassroom(id) {
    return fetch({
        url: '/api/arrangementservice/masterClassManage/deleteClassroom?id=' + id,
        method: 'get',
    });
}

/** *
 * 导出
 */
export function exportMasterClass(data) {
    return fetch({
        url: '/api/arrangementservice/masterClassManage/export',
        method: 'post',
        data
    });
}

export function getExportStatus(key) {
    return fetch({
        url: `/api/arrangementservice/masterClassManage/findExportStatus/${key}`,
        method: 'get'
    });
}
